Skip to content

Conversation

@laileni-aws
Copy link
Contributor

Problem

  • Missing data if job fails at StartTestGeneration API.

Solution

  • Adding requestId for amazonq_utgGenerateTests event, which helps ti debug the reason for job failures from the backend.

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.

License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@laileni-aws laileni-aws requested review from a team as code owners December 7, 2024 02:06
@github-actions
Copy link

github-actions bot commented Dec 7, 2024

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

logger.debug('target line range end: %O', firstTargetLineRangeList?.end)

const resp = await codewhispererClient.codeWhispererClient.startTestGeneration(req).catch((err) => {
ChatSessionManager.Instance.getSession().startTestGenerationRequestId = err.requestId
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so ChatSessionManager.Instance.getSession() is global, shared, mutable state?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, its global and mutable.

Copy link
Contributor

@justinmk3 justinmk3 Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's clear that will be a source of bugs, right? Any random codepath can update requestId at any time, and it may be completely wrong.

@justinmk3 justinmk3 merged commit 226dd6f into aws:master Dec 9, 2024
25 of 26 checks passed
karanA-aws pushed a commit to karanA-aws/aws-toolkit-vscode that referenced this pull request Jan 17, 2025
…6181

## Problem
- Missing data if job fails at `StartTestGeneration` API.

## Solution
- Adding requestId for `amazonq_utgGenerateTests` event, which helps to
debug the reason for job failures from the backend.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants